const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  mode: 'development',
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist'),
  },
  devtool: 'inline-source-map',
  plugins: [
    new HtmlWebpackPlugin({
      title: 'Data Reaactive'
    }),
  ],
  devServer: {
    static: {
      directory: path.join(__dirname, 'dist'), // 服务 dist 下的静态文件
    },
    port: 8080
  },
};